<?php
/*
 * Action Dashboard
 */

class DashboardAction extends Action{
	
	public function index(){
		
		$o = '<ul>';
		$o .= '<li>' . l('home/index', 'home/index') . '</li>';
		$o .= '<li>' . l('<front>', '<front>') . '</li>';
		$o .= '<li>' . l('控制面板', 'admin/dashboard/') . '</li>';
		$o .= '<li>' . l('空空空空空空空空空', '') . '</li>';
		$o .= '</ul>';
		$o .= '<h3>简洁URL设置</h3>';
		$o .= '<form action="' . pithy_url('admin/dashboard') . '" method="post">';
		
		if(isset($_POST['clean_url'])){
			variable_set('clean_url', $_POST['clean_url']);
			pithy_goto("admin/dashboard");
		}
		
		$o .= '是否开启简洁URL地址:<br />';
		if(variable_get("clean_url", 0)){
			$o .= '<input type="radio" name="clean_url" value="1" checked="checked" />是  ';	
			$o .= '<input type="radio" name="clean_url" value="0"  />否';		
		}else{
			$o .= '<input type="radio" name="clean_url" value="1"  />是 ';
			$o .= '<input type="radio" name="clean_url" value="0"  checked="checked"  />否';	
		}
		$o .= '<br /><input type="submit" value="更新" />';
		$o .= '</form>';
		
		return $o;
	}
}